import {Controller} from "egg"
import {SuccessModel} from "../resp"
export default class UploadController extends Controller{
    public async upload(){
        const {ctx,service,config} = this
        const file:any = ctx.request.files[0];
       let data = await service.uploadService.upload(file,config,"banner")
       ctx.body =  new SuccessModel({url:data})
    }
}